class User {

  int? code;
  UserInfo? data;
  String? message;

  User({
    this.code,
    this.data,
    this.message,
  });
  User.fromJson(Map<String, dynamic> json) {
    code = json['code']?.toInt();
    data = (json['data'] != null) ? UserInfo.fromJson(json['data']) : null;
    message = json['message']?.toString();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['code'] = code;
    if (data != null) {
      data['data'] = this.data!.toJson();
    }
    data['message'] = message;
    return data;
  }
}

class UserInfo {


  int? uId;
  String? phone;
  String? name;
  String? token;
  String? head_img;

  UserInfo({
    this.uId,
    this.phone,
    this.name,
    this.token,
    this.head_img,
  });
  UserInfo.fromJson(Map<String, dynamic> json) {
    uId = json['u_id']?.toInt();
    phone = json['phone']?.toString();
    name = json['name']?.toString();
    token = json['token']?.toString();
    head_img = json['head_img']?.toString();
  }
  Map<String, dynamic> toJson() {
    final data = <String, dynamic>{};
    data['u_id'] = uId;
    data['phone'] = phone;
    data['name'] = name;
    data['token'] = token;
    data['head_img'] = head_img;
    return data;
  }
}

